//
// event type & event base
//
// wangsihong@live.com
//
//

#ifndef Rooftop_RFEventBase_H
#define Rooftop_RFEventBase_H

#include "RFObject.h"
#include <string>

namespace Rooftop {

    class EventType : public RFObject{
        public :
        EventType()
            : key(0)
        {}
        ~EventType() {}

        const char* str() { return estring.c_str(); }

        int key;
        std::string estring;
    };

    class EventBase : public RFObject
    {
        public:
        EventBase(const char * estr, int key = 0)
        {
            setType(estr, key);
        }
        EventBase() {}
        ~EventBase() {}

        EventType type() { return m_type; }
        void setType(const char * estr, int key = 0)
        {
            m_type.key = key;
            m_type.estring = estr;
        }

        private:
        EventType m_type;
    };
}

#endif

